package com.gimi.cloud.jimi.app.consumer.feign;

import com.gimi.cloud.jimi.dto.sys.HtmlDTO;
import com.gimi.cloud.jimi.dto.user.UserDTO;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * create by xiankejin on 2017-10-13
 */
@FeignClient(name = "jimi-app-service")
public interface UserFeignService {

    /**
     * 获取注册验证码
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/user/getUserRegisterCode", method = RequestMethod.POST)
    String getUserRegisterCode(@RequestBody UserDTO userDTO);

    /**
     * 获取修改密码验证码
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/user/getModifypasswordCode", method = RequestMethod.POST)
    String getModifypasswordCode(UserDTO userDTO);

    /**
     * 发送用户lbs等数据
     * @param map
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/user/getInformation", method = RequestMethod.POST)
    String getInformation(@RequestBody Map<String, String> map);

    /**
     * 获取注册协议
     * @param
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/user/getRegistAgreement", method = RequestMethod.POST)
    String getRegistAgreement(HtmlDTO htmlDTO);
}